/*
 *         Copyright (c) KUBOTA Corporation and HUDSON SOFT,
 *                  1994, 1995 All Rights Reserved
 *
 *  This software comprises unpublished confidential information of
 *  KUBOTA Corp. and HUDSON SOFT. It may not be used, copied or made 
 *  available to anyone, except in accordance with the license under
 *  which it is furnished.
 */
static char SccsId[] = "@(#)main.c	1.3	9/19/95";
#include <farl.h>

#undef DO_WIDE_MODE 

extern short	buta_zoom_x, buta_zoom_y, buta_zoom_z;
extern short	buta_rot_x, buta_rot_y, buta_rot_z;
extern short	buta_off_x, buta_off_y, buta_off_z;
extern short	buta_delta_x, buta_delta_y, buta_delta_z;

void
main()
{
     unsigned short pe_cnt_val, val;
     float	l1[3] = {0.5773, 0.5773, 0.5773};

     FX73init();
     FarlInit();

     FX73_cmap_i6c3();
     FarlSetPEICMaskReg(FARL_ICMASK_I6C3);

     /* Hidden clear */
     FarlSetMemReg(FARL_DISPLAY_CONTROL_REG,
		   FARL_DISPLAY_CONTROL_BCM0 | FARL_DISPLAY_CONTROL_HCE);
     FarlSetPEMaskReg(0x3fff);
     FarlSetPEClearMaskReg(0x3fff);
     FarlSetPEClearColorReg(0x807);

     pe_cnt_val = FarlGetPEReg(FARL_PE_CONTROL_REG, FARL_BLK);
     FarlSetPEControlReg(pe_cnt_val | FARL_PE_TLEN);
     FarlSetLight(FARL_LIGHT0, 0x49e4, 0x49e4, 0x49e4);
     FarlSetLightCoef(0x1999, 0x47ae, 0x47ae, 0x51eb, 0x51eb);
     FarlSetTEControlReg(FARL_TE_ICM | FARL_TE_LTEN
			 | FARL_TE_SPEN | FARL_TE_BCE);

     instbuta();

     while (1) {
	  jumpbuta();
	  jumpbuta();
	  jumpbuta();
	  turnbuta();

	  jumpbuta();
	  jumpbuta();
	  jumpbuta();
	  crushbuta();
     }
}
